﻿@model List<KidChoreApp.DataModels.Kid>

<h2>Child Class List</h2>

<table class="table table-hover table-bordered table-striped">
    <tr>
        <th>Child Name</th>
        <th>Grade</th>
        <th>Teacher</th>
    </tr>
    @foreach (var c in @Model)
    {
        <tr onclick="location.href='/Kid/KidDetail/@c.Id'">
            <td>@c.Name</td>
            <td>@c.Grade</td>
            <td>@c.Teacher</td>
        </tr>
    }

</table>
<div>
    <button class="btn btn-success btn-block" onclick="location.href='/Kid/AddKid'">Add New Child</button>
</div>